home *** CD-ROM | disk | FTP | other *** search
/ Archive Magazine CD 1995 / Archive Magazine CD 1995.iso / discs / prog_disc / volume_5 / issue_05 / hints / logi_bits / InitFile < prev   
Encoding:
Text File  |  1991-12-03  |  2.1 KB  |  56 lines

  1. | "InitFile" -  Public Domain by D.Potter  26/6/90
  2. | Allows keyboard emulated loading by double-clicking on a data file
  3. | in the RiscOS desktop.
  4. | Intended in this version for Logistix, but the principal will work for
  5. | other programs which do not clear the keyboard buffer at startup.
  6. | This is an Obey File. ( Exec files do not allow passing of system
  7. | parameters.) To pass actual commands to Logistix, (or any similar
  8. | application), an Exec file must be used.
  9. | The Exec file is built by this file, including the full path for the
  10. | startup file that was clicked on.
  11. | The !Boot file for app. must be an Obey file containing the commands -
  12. |         Set Logi$Dir <Obey$Dir>
  13. |         Set Alias$@RunType_xxx Obey <Logi$Dir>.InitFile %%*0
  14. | (As well as any other commands already there)
  15. | Where xxx is the filetype for the data file (DFF for Logistix).
  16. | Logi$Dir will be the directory where the application resides, and
  17. | is automatically set up when the application's !Boot is first seen.
  18. | Note : the | characters at the start of the above lines should NOT be
  19. | in the !Boot file!
  20. |
  21. | -----------------  The Program  ----------------------------
  22. |
  23. | Put the pathname information in temporary system variable Lload$
  24. Set Lload$ %*0
  25. | Clear extraneous data which appears when a file is written to at this
  26. | stage by dummy spooling. - This data is not needed here anymore!
  27. Spool <Logi$Dir>.!LoadFile
  28. Echo <Lload$>
  29. spool
  30. | Now create the actual Exec file which will run LGX and issue the commands.
  31. Spool <Logi$Dir>.!LoadFile
  32. Echo || !LoadFile - Transient program built by InitFile (PD) by D.Potter 1990
  33. Echo *Run <Logi$Dir>.!Run
  34. |
  35. | Send the Logistix load sequence - Note : NO SPACES in the sequence!
  36. | /L = load, L= Logistix data file, <Lload$>= Full filename,
  37. | A= All to be loaded  (You might want to use a different load sequence)
  38. | (Where a return is required such as after the filename here,
  39. | simply start a new Echo statement for the next command.)
  40. |
  41. Echo /LL<Lload$>
  42. Echo A
  43. |
  44. | Close the file
  45. Spool
  46. |
  47. | Set it's file type
  48. SetType <Logi$Dir>.!LoadFile Command
  49. |
  50. | Lose the temporary system variable
  51. UnSet Lload$
  52. |
  53. | And run the file just created!
  54. Exec <Logi$Dir>.!LoadFile
  55.